package org.seedltd.upms.model.detection.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import org.seedltd.core.base.BaseEntityKey;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单管理数据库对象
 * 
 * @author laizuan
 * @version 1.0
 * @since 2021/07/31
 */
@Getter
@Setter
@TableName("detection_order")
public class DetectionOrder extends BaseEntityKey {

    /**
     * 用户主键
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 试剂管主键
     */
    @TableField(value = "tube_id")
    private Long tubeId;

    /**
     * 二维码编号
     */
    @TableField(value = "qrcode_id")
    private Long qrcodeId;

    /**
     * 贩卖机主键
     */
    @TableField(value = "vending_machine_id")
    private Long vendingMachineId;

    /**
     * 回收箱主键
     */
    @TableField(value = "recycle_bin_id")
    private Long recycleBinId;

    /**
     * 订单号
     */
    @TableField(value = "trade_no")
    private String tradeNo;

    /**
     * 销售渠道
     */
    @TableField(value = "channel")
    private Integer channel;

    /**
     * 订单总价
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 退款标记
     */
    @TableField(value = "refund_flag")
    private Integer refundFlag;

    /**
     * 状态。1待支付，5待投递，10已投递，13检测中，15已出报告
     */
    @TableField(value = "state")
    private Integer state;

    /**
     * 产品名称
     */
    @TableField(value = "product_names")
    private String productNames;

    /**
     * 绑定状态，1已绑定，0未绑定
     */
    @TableField(value = "binding_state")
    private Integer bindingState;

    /**
     * 微信商户订单号
     */
    @TableField(value = "transaction_id")
    private String transactionId;

    /**
     * 检测时间
     */
    @TableField(value = "check_time")
    private Date checkTime;

    /**
     * 检测人主键
     */
    @TableField(value = "check_by")
    private Long checkBy;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 检测状态 1 已完成，0未开始
     */
    @TableField(value = "check_state")
    private Integer checkState;

    /**
     * 检测结果字符串状态
     */
    @TableField(value = "result_state")
    private String resultState;

    /**
     * 检测结果评分
     */
    @TableField(value = "result_scope")
    private Integer resultScope;

    /**
     * 出货状态，1已出货，0未出货
     */
    @TableField(value = "export_flag")
    private Integer exportFlag;

    /**
     * 订单删除状态，1已删除，0未删除
     */
    @TableField(value = "delete_flag")
    private Integer deleteFlag;
}